﻿@model Mvc.Models.Evaluacion

@{
    var options = new AjaxOptions()
                      {
                          Url = Url.Action("Create", "Evaluacion"),

                          UpdateTargetId = "content",
                          InsertionMode = InsertionMode.Replace, // <-- Replace the content of DOM element
                          HttpMethod = "POST",



                      };  
}


<h2>Create</h2>

@using (Ajax.BeginForm(options)) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Evaluacion</legend>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Estado)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Estado)
            @Html.ValidationMessageFor(model => model.Estado)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Responsable)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Responsable)
            @Html.ValidationMessageFor(model => model.Responsable)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Concepto)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Concepto)
            @Html.ValidationMessageFor(model => model.Concepto)
        </div>

        
        <div class="editor-field">
            @Html.HiddenFor(model => model.ProyectoID)
          
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FechaCreacion)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FechaCreacion)
            @Html.ValidationMessageFor(model => model.FechaCreacion)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
      @Ajax.ActionLink("Regresar", "Index", "Evaluacion",new { ProyectoID=Model.ProyectoID }, new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" },new { @class = "btn btn-default navbar-btn" })
  
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
